<foreach name="data" key="key" item="value">
	<div class="the-box no-border store-list">
		<div class="media">
			<div class="clearfix visible-xs"></div>
			<div class="media-body">		                              
				<h4 class="media-heading">
				     <a href="#fakelink">
					     <strong>{$depart[$value['department_id']][department_name]}</strong> 
					     <span class="label label-info pull-right">部门人数：{$num[$key]}人</span>
				     </a>
				</h4>
				<ul class="list-inline">
				     <li><a href="#fakelink">部门负责人</a></li>
				     <li style="list-style: none">|</li>
				     <li>某某某</li>
				</ul>
				<ul class="list-inline">
				     <li><a href="#fakelink">部门电话　</a></li>
				     <li style="list-style: none">|</li>
				     <li><span class="label label-danger">1234567</span></li>
				</ul>
				<ul class="list-inline">
				     <li><a href="#fakelink">部门地址　</a></li>
				     <li style="list-style: none">|</li>
				     <li>
				     		<span class="label label-success">
				          【{$depart[$value['department_id']]['local_name']}】{$depart[$value['department_id']]['building_name']}{$depart[$value['department_id']]['floor_name']}</span>
				     </li>
				</ul>
				<span style="background:#8CC152" name="{$value.department_id}" class="save use label label-danger">修改</span>
				<span id="{$value.department_id}" class="delete use label label-danger">删除</span>
			</div>
		</div>
	</div>				
</foreach>
<ul class="pagination success">{$page}</ul>
<script type="text/javascript">
//分页颜色
	$(".current").css({background:"#8CC152",color:"white"});
	//删除
	$(".delete").on("click",function(){
        var id = $(this).attr("id");
       
        if(confirm("确认删除?")){
        $.ajax({
            url:"__URL__/delAct",
            data:{"department_id":id},
            type:"post",
            success:function(data){                       	
               window.location="__SELF__";


            }
        })
        }
     });

	//修改
	$(".save").on("click",function(){
        var id = $(this).attr("name");
        $.ajax({
            url:"__URL__/to_update",
            data:{"department_id":id},
            type:"get",
            success:function(data){
               $("#div_box").html(data);
            }
        })
       
     });
</script>